﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace EVEprod
{
	public partial class Form1 : Form
	{
		private string _keyID = "980637";
		private string _vCode = "yksV23KRYRgYsyedvwxeYZf56Y6yp2a7IOtaRpkSnAlZR169utejfNLAk2pKxS8u";
		public Form1()
		{
			InitializeComponent();
		}

		private void buttonRefresh_Click(object sender, EventArgs e)
		{
			EVEAPI.Server.ServerStatus api = new EVEAPI.Server.ServerStatus();
			api.Read();
			labelServerStatus.Text = api.ServerOpen ? string.Format("Online players : {0}", api.OnlinePlayers) : "Server offline";
		}

		private void button1_Click(object sender, EventArgs e)
		{
			EVEAPI.Account.Characters api = new EVEAPI.Account.Characters(_keyID, _vCode);
			api.Read();
			Console.WriteLine("TEset");
		}

		private void button2_Click(object sender, EventArgs e)
		{
			EVEAPI.Account.AccountStatus api = new EVEAPI.Account.AccountStatus(_keyID, _vCode);
			api.Read();

			Console.WriteLine("{0}\n{1}\n{2}\n{3}",
				api.PaidUntil,
				api.CreateDate,
				api.LogonCount,
				api.LogonMinutes
				);
		}

	}
}
